package com.uni.tag_group.activity;

import android.graphics.Color;
import android.graphics.drawable.GradientDrawable;
import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;

import com.uni.tag_group.R;
import com.uni.tag_group.databinding.ActivityGradientBgBinding;


public class GradientBgActivity extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ActivityGradientBgBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_gradient_bg);
        int colors[] = {0xff255779,0xffa6c0cd};
        GradientDrawable gradientDrawable = new GradientDrawable(GradientDrawable.Orientation.BL_TR, colors);
        binding.textView1.setBackground(gradientDrawable);

        int colors2[] = {Color.parseColor("#Ec008c"),Color.parseColor("#6739b6")};
        GradientDrawable gradientDrawable2 = new GradientDrawable(GradientDrawable.Orientation.BL_TR, colors2);
        gradientDrawable2.setCornerRadius(20f);
        binding.textView2.setBackground(gradientDrawable2);
    }
}
